<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/secondarytitle.css">
<link rel="stylesheet" href="statics/css/ExportBusiness/tpl/newupoffer.css">
<div class="layui-fluid">
    <div class="layui-card">
        <div class="header">
            <img class="img " src="statics/images/titheader.svg">
            <span>报价新增</span>
        </div>
        <div class="layui-card-body">
            <form class="layui-form" action="" lay-filter="editor-form">
                <%--                star--%>
                <dl class="layui-row sk_row">
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>报价单号</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="billNo" id="billNo" readonly="readonly" lay-verify="required" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>报价日期</text>
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="time" id="time" lay-verify="required|date" autocomplete="off" class="layui-input" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>客户名称</text>
                        </div>
                        <div class="layui-col-xs8">
                            <div class="layui-input-block" style="margin-left: 0;width: 100%" id="customerSelect"></div>
                            <input type="hidden" id="customerName" name="customerName">
                            <input type="hidden" id="customerCode" name="customerCode">
                        </div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            国家
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="countryCode" id="countryCode" lay-filter="countryCode">
                            <option value=""></option>
                        </select>
                            <input type="hidden" name="countryName" id="countryName"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            客户联系人
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="customerContactName" id="customerContactName" lay-filter="customerContactName">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            联系人邮箱
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="contactEmail" id="contactEmail" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            报价有效期限
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="termOfValidity" id="termOfValidity" autocomplete="off" class="layui-input" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            交货期限
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="deliveryPeriod" id="deliveryPeriod" autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>价格术语</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="priceTermsCode" id="priceTermsCode" lay-filter="priceTermsCode" lay-verify="required">
                            <option value=""></option>
                        </select>
                            <input type="hidden" name="priceTermsName" id="priceTermsName"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            报价总额
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="totalQuotation" id="totalQuotation" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>业务员</text>
                        </div>
                        <div class="layui-col-xs8">
                            <select lay-search name="salesmanCode" id="salesmanCode" lay-filter="salesmanCode" lay-verify="required">
                                <option value=""></option>
                            </select>
                            <input type="hidden" name="salesman" id="salesman">
                        </div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>币种</text>
                        </div>
                        <div class="layui-col-xs8">   <select lay-search name="currencyCode" id="currencyCode" lay-filter="currencyCode" lay-verify="required">
                            <option value=""></option>
                        </select>
                            <input type="hidden" name="currency" id="currency"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>美元汇率</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="usdRate" id="usdRate" autocomplete="off" class="layui-input" lay-verify="required|number"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>人民币汇率</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="rmbRate" id="rmbRate" autocomplete="off" class="layui-input" lay-verify="required|number"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            签约公司
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="signingCompanyCode" id="signingCompanyCode" lay-filter="signingCompanyCode" lay-verify="required">
                            <option value=""></option>
                        </select>
                            <input type="hidden" name="signingCompanyName" id="signingCompanyName"></div>
                    </dd>


                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            备注
                        </div>
                        <div class="layui-col-xs8"><textarea name="memo" placeholder="请输入内容" class="layui-textarea"></textarea></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>收款银行</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="bankCode" id="bankCode" lay-filter="bankCode">
                            <option value=""></option>
                        </select>
                            <input type="hidden" name="bankName" id="bankName"></div>
                    </dd>
                    <dd class="layui-col-md3">

                        <div class="layui-col-xs12"> <select lay-search name="bankAccount" id="bankAccount" lay-filter="bankAccount">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            客户等级
                        </div>
                        <div class="layui-col-xs8">
                            <input type="text" name="customerLevelName" id="customerLevelName" autocomplete="off" class="layui-input">
                            <input type="hidden" name="customerLevelCode" id="customerLevelCode">
                        </div>
                    </dd>

                </dl>
                <%--                over--%>


                <div class="layui-row">
                    <div class="layui-col-xs12">
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">产品</li>
                                <li class="">费用</li>
                                <li class="">附件</li>
                                <li class="">日志</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div  class="layui-tab-item  layui-show">
                                    <table class="layui-table" id="storageproducts" lay-filter="storageproductstable"></table>

                                    <div class="layui-tab layui-tab-card" id="hidden">
                                        <ul class="layui-tab-title">
                                            <li class="layui-this">产品规格配件</li>
                                        </ul>
                                        <div class="layui-tab-content">
                                            <div class="layui-tab-item layui-show">
                                                <table class="layui-table" id="productsaselect" lay-filter="productsatable"></table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-table" id="cost" lay-filter="costtable"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-table" id="attachment" lay-filter="attachmenttable"></table>
                                </div>
                                <div class="layui-tab-item"><table class="layui-table" id="otherwarehouselog" lay-filter="logtable"></table></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="padding text-right">
                    <button type="button" class="layui-btn" lay-submit="" lay-filter="form-element">立即提交</button>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="layui-upload" id="attachmentupload" style="display: none;padding: 10px">
    <a type="button" class="layui-btn layui-btn-normal" id="uploadfile">选择文件</a>
    <div class="layui-upload-list">
        <table class="layui-table">
            <thead>
            <tr><th>文件名</th>
                <th>大小</th>
                <th>状态</th>
                <th>操作</th>
            </tr></thead>
            <tbody id="uploadlist"></tbody>
        </table>
    </div>
    <a type="button" class="layui-btn" id="testListAction">开始上传</a>
</div>
<script type="text/html" id="imgTpl">
    <img src="{{d.img}}" data-id="{{d.tempId}}" class="btn_productimg" onerror="this.src='statics/images/layui-logo.jpg';this.onerror=null" alt="产品图片" style="max-width:70px;max-height: 28px;">
</script>

<script type="text/html" id="productcodeselect">
    <div class="layui-input-inline">
        <div class="layui-form-select ySearchSelect y_{{d.tempId}}" data-id="{{d.tempId}}">
            <div class="layui-input value_{{d.tempId}}">{{d.productCode==undefined?"":d.productCode}}</div>
            <i class="layui-edge"></i>
            <table class="layui-table zdy" id="productcodeselect_{{d.tempId}}" lay-filter="productcodeselecttable_{{d.tempId}}"></table>
        </div>
    </div>
</script>

<script type="text/html" id="customscodeselect">
    <select name="customsCode" class="customsCode" id="customsCode_{{d.tempId}}" lay-filter="customscodeselect_filter">
        <option value=""></option>
    </select>
</script>

<script type="text/html" id="unitselect">
    <select name="productUnitCode" class="productUnitCode" id="productUnitCode_{{d.tempId}}" lay-filter="unitselect_filter">
    </select>
</script>

<script type="text/html" id="costtypeselect">
    <select name="typeCode" class="typeCode" id="typeCode_{{d.tempId}}" lay-filter="costtypeselect_filter">
        <option value=""></option>
    </select>
</script>

<script type="text/html" id="costtoolbar">
    <a class="layui-btn layui-btn-normal" lay-event="new">增加费用</a>
    <a class="layui-btn layui-btn-danger" lay-event="del">删除</a>
    <span> 说明:（金额>0 为增加费用；金额<0 为扣减费用）</span>
</script>

<script type="text/html" id="storageproductstoolbar">
    <a class="layui-btn layui-btn-normal" lay-event="new">新增</a>
    <a class="layui-btn layui-btn-danger" lay-event="del">删除</a>
</script>
<script type="text/html" id="storageproductseditor">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="attachmenttoolbar">
    <a class="layui-btn" data-type="getCheckData" lay-event="uploadfile">上传</a>
    <a class="layui-btn layui-btn-danger" lay-event="annexDel">删除</a>
</script>
<script type="text/html" id="attachmenteditor">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="download">下载</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="productsaup">
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="productsade">删除</a>
</script>
<script type="text/html" id="productsatoolbar">
    <a class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="new">添加</a>
    <a class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="delet">删除</a>
</script>
<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/js/ExportBusiness/tpl/newupoffer.js"></script>
<script src="statics/js/bignumber.js"></script>
